////////////////////////////////////////////////
// File: Business.java
// Description: Enter summary here after generation.
// Date: 2016-09-23 09:09:33
// Web: http://www.elanzhou.com/
////////////////////////////////////////////////
package com.mvc.entity;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
import java.text.SimpleDateFormat;
/**
 * business entity. @author 马威
 */
@Entity
@Table(name = "business")
public class Business implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	@Id
	@Basic(optional = false)
	@GeneratedValue(strategy = GenerationType.IDENTITY)   
    @Column(name = "ID", nullable = false)
	private Integer ID;
    //机构名称
    @Column(name = "businessname")
	private  String Businessname;
    //通信地址
    @Column(name = "businessaddress")
	private  String Businessaddress;
    //联系电话
    @Column(name = "businesstel")
	private  String Businesstel;
    //联系人
    @Column(name = "businessman")
	private  String Businessman;
    //简介
    @Column(name = "companycon")
	private  String Companycon;
    //logo
    @Column(name = "logopic")
	private  String Logopic;
    //星级
    @Column(name = "star")
	private  String Star;
    public int getId() {
       return this.ID;
	   }
	public void setId(int ID) {
	   this.ID = ID;
       }
    public String getBusinessname() {
       return this.Businessname;
	   }
	public void setBusinessname(String Businessname) {
	   this.Businessname = Businessname;
	   }
    public String getBusinessaddress() {
       return this.Businessaddress;
	   }
	public void setBusinessaddress(String Businessaddress) {
	   this.Businessaddress = Businessaddress;
	   }
    public String getBusinesstel() {
       return this.Businesstel;
	   }
	public void setBusinesstel(String Businesstel) {
	   this.Businesstel = Businesstel;
	   }
    public String getBusinessman() {
       return this.Businessman;
	   }
	public void setBusinessman(String Businessman) {
	   this.Businessman = Businessman;
	   }
    public String getCompanycon() {
       return this.Companycon;
	   }
	public void setCompanycon(String Companycon) {
	   this.Companycon = Companycon;
	   }
    public String getLogopic() {
       return this.Logopic;
	   }
	public void setLogopic(String Logopic) {
	   this.Logopic = Logopic;
	   }
    public String getStar() {
       return this.Star;
	   }
	public void setStar(String Star) {
	   this.Star = Star;
	   }
	  public String getCompanycon(int count)
			{
				String ct="";
				String txtcontent = Companycon.replaceAll("</?[^>]+>", "");   
			    txtcontent = txtcontent.replaceAll("<a>\\s*|\t|\r|\n</a>", "");
			    if(txtcontent.trim().length()>count){
			    ct=txtcontent.trim().substring(0,count);
			    }else
			    {
			    	ct=txtcontent.trim();
			    }
				return ct;	
			}
	   
}